#include "environment.h"
#include <QtCore/QDebug>
#include <QtCore/QFile>
#include <QtCore/QTextStream>

void Dumper::write()
{
    QFile file ("temp.qml");
    if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
        exit(1);

    QTextStream outstream(&file);
    outstream << m_script;
    file.flush();
    file.close();
}

Dumper::Dumper(QObject *parent): QObject(parent)
{
}

QString Dumper::script() const
{
    return m_script;
}

void Dumper::setScript(const QString &ascript)
{
    m_script = ascript;
}
